package br.com.comanda.vos;

import java.util.List;

public class Account {

	private Integer id;
	private String client;
	private String waiter;
	private Board board;
	private List<Item> items;

	public Account(Integer id, String clientName, Board board) {
		this.id = id;
		this.client = clientName;
		this.board = board;
	}

	public Account(int accountId) {
		this.id = accountId;
	}

	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getClient() {
		return this.client;
	}

	public void setClient(String clientName) {
		this.client = clientName;
	}

	public String getWaiter() {
		return this.waiter;
	}

	public void setWaiter(String waiter) {
		this.waiter = waiter;
	}

	public Board getBoard() {
		return this.board;
	}

	public void setBoard(Board board) {
		this.board = board;
	}

	public List<Item> getItems() {
		return this.items;
	}

	public void setItems(List<Item> items) {
		this.items = items;
	}

	public Double getTotal() {
		double total = 0;
		if (this.items != null) {
			for (Item item : this.items) {
				total += item.getTotal();
			}
		}

		return total;
	}

}
